????ࡱ> q` R0QFbjbjqPqP2::Q>~tZZZZlƃ΄6nr< wyyyyyy$hVΆΆΆΆwΆwVӓ@+„ PyqZȊ^ [Ȗ0 @&@++@?ΆΆΆΆΆΆΆ ΆΆΆΆΆΆΆ1Q1Qz Three Ways To Get Your System's Network MAC Address - by Borland Developer Support Staff  HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" http://community.borland.com/article/0,1410,26040,00.html Determining The MAC Address of Your System in Three Parts  I have searched endlessly through newsgroups and websites for a simple way to determine the MAC (network interface card) adress of my system. You would think that because of the overwhelming demand (especially in newsgroups) for an answer to this question, that there would be many examples available. This is not so. These examples are as a result of tireless searching and some actual learning on my part (imagine that!). Note: none of these examples involve parsing the output of ipconfig.exe /all Table Of Contents  HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" \l "objective#objective" Objective  HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" \l "method1#method1" Method 1 - Netbios API  HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" \l "method2#method2" Method 2 - Using the COM API  HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" \l "method3#method3" Method 3 Using SNMP  HYPERLINK "http://codecentral.borland.com/codecentral/ccweb.exe/download?id=15294" Example Projects  HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" \l "top#top" Objective The purpose of this article is to give easy methods of determining your MAC address. I will explain how the code works and provide sample projects to illustrate it. I am assuming that you have a grasp of the following concepts: Borland C++Builder Simple network concepts Some Win32 API  HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" \l "top#top" Method 1 - Using the Netbios API [ HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" \l "code1#code1" code] This method of getting your computer's MAC address uses Microsoft's Netbios API. This is a set of commands that enables lower-level network support than provided by say Winsock. The disadvantage to using Netbios to determine your address is that you must have Netbios installed (not really a problem if you are on a Windows network and use file sharing). Otherwise this method is quick and accurate. The Netbios API includes only one function, called simply Netbios. This function takes a network control block structure as its parameter, which tells it what it needs to do. The structure is defined as follows: typedef struct _NCB { UCHAR ncb_command; UCHAR ncb_retcode; UCHAR ncb_lsn; UCHAR ncb_num; PUCHAR ncb_buffer; WORD ncb_length; UCHAR ncb_callname[NCBNAMSZ]; UCHAR ncb_name[NCBNAMSZ]; UCHAR ncb_rto; UCHAR ncb_sto; void (CALLBACK *ncb_post) (struct _NCB *); UCHAR ncb_lana_num; UCHAR ncb_cmd_cplt; #ifdef _WIN64 UCHAR ncb_reserve[18]; #else UCHAR ncb_reserve[10]; #endif HANDLE ncb_event; } NCB, *PNCB; Focus especially on the ncb_command member. This is the member that tells Netbios what to do. We will use 3 commands in determining the MAC address. They are defined on MSDN as follows: Command Description NCBENUM Windows NT/2000: Enumerates LAN adapter (LANA) numbers. When this code is specified, the ncb_buffer member points to a buffer to be filled with a LANA_ENUM structure. NCBENUM is not a standard NetBIOS 3.0 command. NCBRESET Resets a LAN adapter. An adapter must be reset before it can accept any other NCB command that specifies the same number in the ncb_lana_num member. NCBASTAT Retrieves the status of either a local or remote adapter. When this code is specified, the ncb_buffer member points to a buffer to be filled with an ADAPTER_STATUS structure, followed by an array of NAME_BUFFER structures. Here are the steps to getting the MAC address(es) of your system: Enumerate the adaptors Reset each adaptor to get proper information from it Query the adaptor to get the MAC address and put it in standard colon-separated format The code below provides a simple illustration of these concepts. For more information on Netbios functions, refer to the Microsoft help files or MSDN. netbios.cpp #include #include #include #include #include using namespace std; #define bzero(thing,sz) memset(thing,0,sz) bool GetAdapterInfo(int adapter_num, string &mac_addr) { // Reset the LAN adapter so that we can begin querying it NCB Ncb; memset(&Ncb, 0, sizeof(Ncb)); Ncb.ncb_command = NCBRESET; Ncb.ncb_lana_num = adapter_num; if (Netbios(&Ncb) != NRC_GOODRET) { mac_addr = "bad (NCBRESET): "; mac_addr += string(Ncb.ncb_retcode); return false; } // Prepare to get the adapter status block bzero(&Ncb,sizeof(Ncb); Ncb.ncb_command = NCBASTAT; Ncb.ncb_lana_num = adapter_num; strcpy((char *) Ncb.ncb_callname, "*"); struct ASTAT { ADAPTER_STATUS adapt; NAME_BUFFER NameBuff[30]; } Adapter; bzero(&Adapter,sizeof(Adapter)); Ncb.ncb_buffer = (unsigned char *)&Adapter; Ncb.ncb_length = sizeof(Adapter); // Get the adapter's info and, if this works, return it in standard, // colon-delimited form. if (Netbios(&Ncb) == 0) { char acMAC[18]; sprintf(acMAC, "%02X:%02X:%02X:%02X:%02X:%02X", int (Adapter.adapt.adapter_address[0]), int (Adapter.adapt.adapter_address[1]), int (Adapter.adapt.adapter_address[2]), int (Adapter.adapt.adapter_address[3]), int (Adapter.adapt.adapter_address[4]), int (Adapter.adapt.adapter_address[5])); mac_addr = acMAC; return true; } else { mac_addr = "bad (NCBASTAT): "; mac_addr += string(Ncb.ncb_retcode); return false; } } int main() { // Get adapter list LANA_ENUM AdapterList; NCB Ncb; memset(&Ncb, 0, sizeof(NCB)); Ncb.ncb_command = NCBENUM; Ncb.ncb_buffer = (unsigned char *)&AdapterList; Ncb.ncb_length = sizeof(AdapterList); Netbios(&Ncb); // Get all of the local ethernet addresses string mac_addr; for (int i = 0; i < AdapterList.length - 1; ++i) { if (GetAdapterInfo(AdapterList.lana[i], mac_addr)) { cout << "Adapter " << int (AdapterList.lana[i]) << "'s MAC is " << mac_addr << endl; } else { cerr << "Failed to get MAC address! Do you" << endl; cerr << "have the NetBIOS protocol installed?" << endl; break; } } return 0; } //---------------------------------------------------------------------------  HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" \l "top#top" Method 2 - COM GUID API [ HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" \l "code2#code2" code] This method uses the COM API to create a GUID (globably unique identifier) and derive the MAC address therefrom. GUIDs are used commonly to identify COM components and other objects in the system. They are computed from the MAC address (among other things) and ostensibly contain that address within them. I say ostensibly because that is not at all certain. I provide this method mostly as an example of what not to do. You may end up with you MAC address this way, but chances are you'll just end up with some random hex values. This is pretty simple and doesn't require much explanation. We create a GUID with CoCreateGuid and dump the last six bytes into a string. These should be the MAC address, but as I said, there's no way to be certain. uuid.cpp #include #include #include using namespace std; int main() { cout << "MAC address is: "; // Ask COM to create a UUID for us. If this machine has an Ethernet // adapter, the last six bytes of the UUID (bytes 2-7 inclusive in // the Data4 element) should be the MAC address of the local // Ethernet adapter. GUID uuid; CoCreateGuid(&uuid); // Spit the address out char mac_addr[18]; sprintf(mac_addr,"%02X:%02X:%02X:%02X:%02X:%02X", uuid.Data4[2],uuid.Data4[3],uuid.Data4[4], uuid.Data4[5],uuid.Data4[6],uuid.Data4[7]); cout << mac_addr << endl; getch(); return 0; }  HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" \l "top#top" Method 3 - Using the SNMP Extension API [ HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" \l "code3#code3" code] The third method I will talk about is using the SNMP (Simple Network Management Protocol) extension in Windows to get your system's address. The protocol in my experience is anything but simple, but the code should read pretty straight-forwardly. Basically the steps are the same as with Netbios: Get a list of adapters Query each adapter for type and MAC address Save the adapters that are actual NICs I don't personally know much about SNMP, but as I said before, the code is pretty clear. For more information, refer to the following URLs:  HYPERLINK "http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/network/snmp_156b.htm" SNMP Functions  HYPERLINK "http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/network/snmp_1p6b.htm" SNMP Variable Types and Request PDU Types  HYPERLINK "http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/network/snmp_0xtf.htm" SNMP Structures snmp.cpp #include #include #include typedef bool(WINAPI * pSnmpExtensionInit) ( IN DWORD dwTimeZeroReference, OUT HANDLE * hPollForTrapEvent, OUT AsnObjectIdentifier * supportedView); typedef bool(WINAPI * pSnmpExtensionTrap) ( OUT AsnObjectIdentifier * enterprise, OUT AsnInteger * genericTrap, OUT AsnInteger * specificTrap, OUT AsnTimeticks * timeStamp, OUT RFC1157VarBindList * variableBindings); typedef bool(WINAPI * pSnmpExtensionQuery) ( IN BYTE requestType, IN OUT RFC1157VarBindList * variableBindings, OUT AsnInteger * errorStatus, OUT AsnInteger * errorIndex); typedef bool(WINAPI * pSnmpExtensionInitEx) ( OUT AsnObjectIdentifier * supportedView); void main() { HINSTANCE m_hInst; pSnmpExtensionInit m_Init; pSnmpExtensionInitEx m_InitEx; pSnmpExtensionQuery m_Query; pSnmpExtensionTrap m_Trap; HANDLE PollForTrapEvent; AsnObjectIdentifier SupportedView; UINT OID_ifEntryType[] = {1, 3, 6, 1, 2, 1, 2, 2, 1, 3}; UINT OID_ifEntryNum[] = {1, 3, 6, 1, 2, 1, 2, 1}; UINT OID_ipMACEntAddr[] = {1, 3, 6, 1, 2, 1, 2, 2, 1, 6}; AsnObjectIdentifier MIB_ifMACEntAddr = { sizeof(OID_ipMACEntAddr) sizeof(UINT), OID_ipMACEntAddr }; AsnObjectIdentifier MIB_ifEntryType = {sizeof(OID_ifEntryType) sizeof(UINT), OID_ifEntryType}; AsnObjectIdentifier MIB_ifEntryNum = {sizeof(OID_ifEntryNum) sizeof(UINT), OID_ifEntryNum}; RFC1157VarBindList varBindList; RFC1157VarBind varBind[2]; AsnInteger errorStatus; AsnInteger errorIndex; AsnObjectIdentifier MIB_NULL = {0, 0}; int ret; int dtmp; int i = 0, j = 0; bool found = false; char TempEthernet[13]; m_Init = NULL; m_InitEx = NULL; m_Query = NULL; m_Trap = NULL; /* Load the SNMP dll and get the addresses of the functions necessary */ m_hInst = LoadLibrary("inetmib1.dll"); if (m_hInst < (HINSTANCE) HINSTANCE_ERROR) { m_hInst = NULL; return; } m_Init = (pSnmpExtensionInit) GetProcAddress(m_hInst, "SnmpExtensionInit"); m_InitEx = (pSnmpExtensionInitEx) GetProcAddress(m_hInst, "SnmpExtensionInitEx"); m_Query = (pSnmpExtensionQuery) GetProcAddress(m_hInst, "SnmpExtensionQuery"); m_Trap = (pSnmpExtensionTrap) GetProcAddress(m_hInst, "SnmpExtensionTrap"); m_Init(GetTickCount(), &PollForTrapEvent, &SupportedView); /* Initialize the variable list to be retrieved by m_Query */ varBindList.list = varBind; varBind[0].name = MIB_NULL; varBind[1].name = MIB_NULL; /* Copy in the OID to find the number of entries in the Inteface table */ varBindList.len = 1; /* Only retrieving one item */ SNMP_oidcpy(&varBind[0].name, &MIB_ifEntryNum); ret = m_Query(ASN_RFC1157_GETNEXTREQUEST, &varBindList, &errorStatus, &errorIndex); printf("# of adapters in this system : %in", varBind[0].value.asnValue.number); varBindList.len = 2; /* Copy in the OID of ifType, the type of interface */ SNMP_oidcpy(&varBind[0].name, &MIB_ifEntryType); /* Copy in the OID of ifPhysAddress, the address */ SNMP_oidcpy(&varBind[1].name, &MIB_ifMACEntAddr); do { /* Submit the query. Responses will be loaded into varBindList. We can expect this call to succeed a # of times corresponding to the # of adapters reported to be in the system */ ret = m_Query(ASN_RFC1157_GETNEXTREQUEST, &varBindList, &errorStatus, &errorIndex); if (!ret) ret = 1; else /* Confirm that the proper type has been returned */ ret = SNMP_oidncmp(&varBind[0].name, &MIB_ifEntryType, MIB_ifEntryType.idLength); if (!ret) { j++; dtmp = varBind[0].value.asnValue.number; printf("Interface #%i type : %in", j, dtmp); /* Type 6 describes ethernet interfaces */ if (dtmp == 6) { /* Confirm that we have an address here */ ret = SNMP_oidncmp(&varBind[1].name, &MIB_ifMACEntAddr, MIB_ifMACEntAddr.idLength); if ((!ret) && (varBind[1].value.asnValue.address.stream != NULL)) { if((varBind[1].value.asnValue.address.stream[0] == 0x44) && (varBind[1].value.asnValue.address.stream[1] == 0x45) && (varBind[1].value.asnValue.address.stream[2] == 0x53) && (varBind[1].value.asnValue.address.stream[3] == 0x54) && (varBind[1].value.asnValue.address.stream[4] == 0x00)) { /* Ignore all dial-up networking adapters */ printf("Interface #%i is a DUN adaptern", j); continue; } if ((varBind[1].value.asnValue.address.stream[0] == 0x00) && (varBind[1].value.asnValue.address.stream[1] == 0x00) && (varBind[1].value.asnValue.address.stream[2] == 0x00) && (varBind[1].value.asnValue.address.stream[3] == 0x00) && (varBind[1].value.asnValue.address.stream[4] == 0x00) && (varBind[1].value.asnValue.address.stream[5] == 0x00)) { /* Ignore NULL addresses returned by other network interfaces */ printf("Interface #%i is a NULL addressn", j); continue; } sprintf(TempEthernet, "%02x%02x%02x%02x%02x%02x", varBind[1].value.asnValue.address.stream[0], varBind[1].value.asnValue.address.stream[1], varBind[1].value.asnValue.address.stream[2], varBind[1].value.asnValue.address.stream[3], varBind[1].value.asnValue.address.stream[4], varBind[1].value.asnValue.address.stream[5]); printf("MAC Address of interface #%i: %sn", j, TempEthernet);} } } } while (!ret); /* Stop only on an error. An error will occur when we go exhaust the list of interfaces to be examined */ getch(); FreeLibrary(m_hInst); /* Free the bindings */ SNMP_FreeVarBind(&varBind[0]); SNMP_FreeVarBind(&varBind[1]); }  HYPERLINK "http://community.borland.com/article/0,1410,26040,00.html" \l "top#top" Back to top  Products: Borland C++ Builder 4.0, Borland C++ Builder 5.x Platforms: Windows 2000 1.0; Windows 95 1.00B; Windows 98 1.0; Windows NT 4.0, 4.0 SP5 34XYZ[g      ¾£ʛm`mMm%hChCB*KHOJQJ^JphhChCCJKHaJ-hChCB*CJKHOJQJ^JaJph-hChCB*CJKHOJQJ^JaJphhChCo(hS hC0JjhCU hChChCjhCU hCo(hC0JOJQJ^Jo(hC0JOJQJ^J#hCB*CJOJQJ^JaJph hC0JYZ    ( {$$1$Ifa$gdCK$dd$1$If[$\$gdC $1$IfgdCHkd]$$IfK$   634Kap $$1$Ifa$gdC QF ' ( ) *   k l T U e f g h i j k ĨѨĨѨĨѨĨѨĨѨĨѨ~)hChCB*CJKHOJQJ^Jph)hChCB*CJKHOJQJ^Jph6jhChCB*CJKHOJQJU^JaJphhChCCJKHaJ-hChCB*CJKHOJQJ^JaJph-hChCB*CJKHOJQJ^JaJph/( ) bkd$IfK$L$u 0634ab $1$IfgdCK$rkd$IfK$L$u    0634abp   -bkd$IfK$L$u 0634abbkd,$IfK$L$u 0634ab $1$IfgdCK$ g h -bkd$IfK$L$u 0634ab $1$IfgdCK$bkdb$IfK$L$u 0634abh i j sfQQQ & Fd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KHOJQJ^JaJphhChCCJKHaJ))***+'-0-y $1$IfgdCK$ $1$IfgdC & Fdd$1$If[$\$gdCdd$1$If[$\$gdCHkdO$$IfK$   634Kap ,,,--$-%-'-/-0-1-B-C-U-V-h-j-q-r-v-...#./ /!/%/////̷~i~i~iQiQiQiQiQiQiQiQ/hChC5B*KHOJPJQJ\^Jph)hChCB*KHOJPJQJ^Jph)hChCB*KHOJPJQJ^Jph hChCCJKHaJ-hChCB*CJKHOJQJ^JaJph)hChCB*CJKHOJQJ^Jph6jhChCB*CJKHOJQJU^JaJph-hChCB*CJKHOJQJ^JaJph0-1-C-V-i-j----..C.ffffffffff% 2( Px 4 #\'*.25@9$1$IfgdCtkd$IfK$L$-$ @ 0634-abp C.q....//F/c/////0F0G0S0U0j000000$1_1% 2( Px 4 #\'*.25@9$1$IfgdC/G0K01222g2m2222222333333333333B44444455J5]555I6]6666/7777888$9Z99999:::;<;W;[;d;;<)hChCB*KHOJPJQJ^Jph/hChC6B* KHOJPJQJ]^Jph/hChC5B*KHOJPJQJ\^Jph)hChCB*KHOJPJQJ^JphA_1111:2b2223%3B3\3u3333333 44.4?4@4~44% 2( Px 4 #\'*.25@9$1$IfgdC44444 555`5m5555 6`6k666607N7l77777% 2( Px 4 #\'*.25@9$1$IfgdC78K8S8888 9!9"9[9999999::I::::;6;D;% 2( Px 4 #\'*.25@9$1$IfgdCD;S;\;;;;<'<T<<<<<<<= =H={=== >O>>>?% 2( Px 4 #\'*.25@9$1$IfgdC<<_<y<<<<<<<====-?Y?k??????`AAAAAA#B=BCCDD,DDDETEUEVEҽҥҥҥҽҥҽҽҽҥҥҘ|6jhChCB*CJKHOJQJU^JaJphhChCCJKHaJ/hChC6B* KHOJPJQJ]^Jph)hChCB*KHOJPJQJ^Jph)hChCB*KHOJPJQJ^Jph/hChC5B*KHOJPJQJ\^Jph(?#?Z?????7@|@@ALAVAAAAAB?B|BBB3CpCCC% 2( Px 4 #\'*.25@9$1$IfgdCCD DD[DDDDDDE0EQESETE& 2( Px 4 #\'*.25@9$1$IfgdCK$% 2( Px 4 #\'*.25@9$1$IfgdCTEUEEEEEPFQFVPCCA dd1$[$\$gdC1$gdC8kd&$$IfK$634Ka $1$IfgdCdkd$IfK$L$-$0634-abVEEEEEEEEEEEEEFFNFPFQF̷誎vavaYhChCo()hChCB*CJKHOJQJ^Jph/hChC5B*CJKHOJQJ\^Jph6jhChCB*CJKHOJQJU^JaJphhChCCJKHaJ)hChCB*CJKHOJQJ^Jph6jhChCB*CJKHOJQJU^JaJph-hChCB*CJKHOJQJ^JaJph01h2P. A!"#$%S ]DyK :http://community.borland.com/article/0,1410,26040,00.htmlyK thttp://community.borland.com/article/0,1410,26040,00.htmlx$$If!vh56%#v6%:V K   6,534Kp $IfK$L$!vh5m #vm :V   06,5/ 34 p $IfK$L$!vh5m #vm :V 06,5/ 34 $IfK$L$!vh5m #vm :V 06,5/ 34 $IfK$L$!vh5m #vm :V 06,5/ 34 $IfK$L$!vh5m #vm :V 06,5/ 34 $IfK$L$!vh5m #vm :V 06,5/ 34 Y$$If!vh56%#v6%:V K6,534Kx$$If!vh56%#v6%:V K   6,534Kp Y$$If!vh56%#v6%:V K6,534Kx$$If!vh56%#v6%:V K   6,534Kp $IfK$L$!vh5w5#vw#v:V  6,534p$IfK$L$-!vh55#v#v:V - 6,534-pT$IfK$L$-!vh55#v#v:V - 6534-pT$IfK$L$-!vh55#v#v:V - 6534-pT$IfK$L$-!vh55#v#v:V - 6534-pT$IfK$L$5!vh5$#v$:V - @ 06,5/ 34-p $IfK$L$5!vh5$#v$:V -06,5/ 34-Y$$If!vh56%#v6%:V K6,534Kx$$If!vh56%#v6%:V K   6,534Kp $IfK$L$5!vh5$#v$:V - @ 06,5/ 34-p $IfK$L$5!vh5$#v$:V -06,5/ 34-Y$$If!vh56%#v6%:V K6,534Kx$$If!vh56%#v6%:V K   6,534Kp $IfK$L$5!vh5$#v$:V - @ 06,5/ 34-p $IfK$L$5!vh5$#v$:V -06,5/ 34-Y$$If!vh56%#v6%:V K6,534KDdp<V  3 C"p((H@H gQe1$$CJKHPJ_HaJmH nHsH tH$A@$ -k=W[WBi@B h*S*Y(phe` CHTML Preformatted: 2( Px 4 #\'*.25@91$KHOJPJQJ^JN^`N CgQe (Web)dd1$[$\$KHOJQJ^J\o!\ C heading31257>*CJH*OJQJS*Y(\^JaJo(ph"o1" Cbody3VoAV Ctitle31/57>*CJOJQJS*Y(\^JaJo(phdoQd Ccontentsectionheading1 57>*CJS*Y(\aJphQ> !"&!"&!"&!"&!"&!"&!"&!"&! "&! "&! "&! "&J #uv)*+, '?,"1 6<T=U===Q>     do YZ() gj_ 4 6 M f   2 G w  $ % uv^_H)=OPe3Qs)Ca(Vz{CwG|"$:S^~4Gz~$*39t(, !45JKVXxy Jcr+ c !!"""#'%0%1%C%V%i%j%%%%&&C&q&&&&''F'c'''''(F(G(S(U(j(((((($)_)))):*b***+%+B+\+u+++++++ ,,.,?,@,~,,,,,, ---`-m---- .`.k....0/N/l/////0K0S0000 1!1"1[111111122I2222363D3S3\33334'4T44444445 5H5{555 6O6667#7Z7777778|889L9V99999:?:|:::3;p;;;< <<[<<<<<<=0=Q=S=T=U====P>S>r r |r |r |$||$|$ZO ||O ||O ||O ||O ||O ||$||$8 $0$|$3$|$||$`'$8 ;||||||||||||||||||||||X@I$g x|W||x|Wppx|Wv v x|W $$|$|$3$$||$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$H$||$X$p- $||$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|0Z$||$h$|$|$3$$||$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|$|^$|r |r g r x r |YZ() ghij_ 4 6 M f   2 G w  $ % uv^_H)=OPe3Qs)Ca(Vz{CwG|"$:S^~4Gz~$*39t()*+, !45JKVXxy Jcr+ c !!"""#'%0%1%C%V%i%j%%%%&&C&q&&&&''F'c'''''(F(G(S(U(j(((((($)_)))):*b***+%+B+\+u+++++++ ,,.,?,@,~,,,,,, ---`-m---- .`.k....0/N/l/////0K0S0000 1!1"1[111111122I2222363D3S3\33334'4T44444445 5H5{555 6O6667#7Z7777778|889L9V99999:?:|:::3;p;;;< <<[<<<<<<=0=Q=S=T=U=====P>S>00000 0 000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 000 000000000000000000000 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 000 0 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0 0 0 0 0 000 0 00000000000000000000000000 0 0 0 0 0 0 0 0 000 0 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0 0 0 0000Z() ghij_ 4 6 M f   2 G w  $ % uv^_H)=OPe3Qs)Ca(Vz{CwG|"$:S^~4Gz~$*39t()*+, !45JKVXxy Jcr+ c !!"""#'%0%1%C%V%i%j%%%%&&C&q&&&&''F'c'''''(F(G(S(U(j(((((($)_)))):*b***+%+B+\+u+++++++ ,,.,?,@,~,,,,,, ---`-m---- .`.k....0/N/l/////0K0S0000 1!1"1[111111122I2222363D3S3\33334'4T44444445 5H5{555 6O6667#7Z7777778|889L9V99999:?:|:::3;p;;;< <<[<<<<<<=0=Q=S=T=U=====P>S>K0I0K0K0K0 K0K00K0K0 K0K0 K0K0 K0K0 K0 K0 K0 K0 K0K0 K0K0 K00K00K00K00K0K0 K0K0 K00K00K0K0K0K0K0K0K0K0K0K0K0K0K0K0K0K0K0K0K0K0K0K0K0 K00K0K0K0 K0K0K0 K0K0K0 K0K0K0 K0 0 K0 0 K0 0 K0 0 K0  K0  K0 K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0" K0"0 K0 K0$ K0 K0& K0 K0(0 K0(0 K0( K0 K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0*K0 K0,K0 K0.K0 K000K000K000K000K00K00K0 K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K02K0 K04K0 K0K00K00 0p= D,"%(,/<VEQF$',069=>BDGLP( h 6u^z"!+"%y&()0-C._147D;?CTEQF%()*+-./1234578:;<?@ACEFHIJKMNOQF&Z) kTejEfk, !$!}!!#$$ $$$$%$%U===Q>XXXXXXXXXXXXXXXXX objectivemethod1code1method2code2method3code3j, '%S>j, /%S>c j 6 = > D X c q |   ( / = D [ c f l  = H o v V ` _k  '3;mrs{} %+,/5DScfqy+02<=@ETcsv *8Xfio  ORTqs2>S> YZ?Cz~~,0===>>S>:::::YZ 6 v, ~""'%1%--0=S>S>{%2&{KzL^`CJOJQJo(^`CJOJQJo(opp^p`CJOJQJo(@ @ ^@ `CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQJo(PP^P`CJOJQJo(^`CJOJQJo(^`CJOJQJo(opp^p`CJOJQJo(@ @ ^@ `CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQJo(PP^P`CJOJQJo(^`CJOJQJo(^`CJOJQJo(opp^p`CJOJQJo(@ @ ^@ `CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQJo(PP^P`CJOJQJo({%{Kz7C() ghij4 6 $ % uv^_)*+, !!'%0%1%T=U===S>@YY|YYQ>@@UnknownGz Times New Roman5Symbol3& z Arial?& Arial Black?5 .0}fԚMingLiUC.e0}fԚPMingLiU?5 z Courier New;Wingdings 1hˇˇM 5 qM 5 q!?!),.:;?]}    " % & ' 2 t%00 0 0 00000013468:<>@BDOPQRTUVWZ\^ \]d([{  5 0 0 00000579;=?ACY[][2>2>3HX)?C2XThree Ways To Get Your System's Network MAC Address - by Borland Developer Support Staffjackjack   Oh+'0$0D T`   \Three Ways To Get Your System's Network MAC Address - by Borland Developer Support Staffjack Normal.dotjack1Microsoft Office Word@F#@-Yq@<|q M 5՜.+,D՜.+, X`lt| q2> (  8@ _PID_HLINKSA fdl0:http://community.borland.com/article/0,1410,26040,00.htmltop#top% -Vhttp://msdn.microsoft.com/library/default.asp?URL=/library/psdk/network/snmp_0xtf.htm)N*Vhttp://msdn.microsoft.com/library/default.asp?URL=/library/psdk/network/snmp_1p6b.htmlN'Vhttp://msdn.microsoft.com/library/default.asp?URL=/library/psdk/network/snmp_156b.htm'l$:http://community.borland.com/article/0,1410,26040,00.html code3#code3dl!:http://community.borland.com/article/0,1410,26040,00.htmltop#top&l:http://community.borland.com/article/0,1410,26040,00.html code2#code2dl:http://community.borland.com/article/0,1410,26040,00.htmltop#top%l:http://community.borland.com/article/0,1410,26040,00.html code1#code1dl:http://community.borland.com/article/0,1410,26040,00.htmltop#topdl:http://community.borland.com/article/0,1410,26040,00.htmltop#top&4Ghttp://codecentral.borland.com/codecentral/ccweb.exe/download?id=15294'l :http://community.borland.com/article/0,1410,26040,00.htmlmethod3#method3&l :http://community.borland.com/article/0,1410,26040,00.htmlmethod2#method2%l:http://community.borland.com/article/0,1410,26040,00.htmlmethod1#method1ql:http://community.borland.com/article/0,1410,26040,00.htmlobjective#objectiveO:http://community.borland.com/article/0,1410,26040,00.html  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQSTUVWXYZ\]^_`abcdefghijklmnopqrstuvwxyz{|}~Root Entry FRqData R#1Table[XWordDocument2SummaryInformation(DocumentSummaryInformation8CompObjm  FMicrosoft Office Word MSWordDocWord.Document.89q